<?php

// +----------------------------------------------------------------------
// | 状态数据表
// +----------------------------------------------------------------------

namespace common\model;

use think\model\RelationModel;

class EntityRelationshipsModel extends RelationModel
{
    // 自动验证
    protected $_validate = [
        ['entity_id', '', '', self::EXISTS_VALIDATE, 'integer'],
        ['relation_entity_id', '', '', self::EXISTS_VALIDATE, 'integer'],
    ];

    // 自动完成
    protected $_auto = [
        ['uuid', 'create_uuid', self::MODEL_INSERT, 'function'],
        ['created_by', 'fill_created_by', self::MODEL_INSERT, 'function'],
        ['created', 'time', self::MODEL_INSERT, 'function'],
    ];
}
